« Introducing the USB7 | Main | Build a MaxSerial Freeduino »
A High-Volume Atmega Arduino Programmer and Tester (April 1, 2008)
I need to program several dozen Atmega168s and I only own ICSP Atmel programmers; what to do? Bodge one up of course. Best of all, the bodged programmer functions as an Arduino test bed.
Starting with an Arduino platform, pull out the Atmega168 and set it aside.
Now, connect the following pins from the Arduino to a 28-pin ZIF socket:
- Reset to pin 1
- RX to pin 2
- TX to pin 3
- +5 to pin 7
- Ground to pin 8
- Digital 13 to pin 17
- Digital 12 to pin 18
- Digital 11 to pin 19
Connect pins 9 and 10 from the Arduino's (now empty) socket to pins 9 and 10 of the ZIF socket. These provide the clock signal.
Attach your programmer's ICSP connector to the Arduino's ICSP header (using a 10 to 6 adaptor if necessary). Connect the USB cable to your Arduino (with it set to USB power), or the power and serial connector to a serial based Arduino.
Insert a blank Atmega168 in the socket and use your programmer to burn the bootloader; now you may use the Arduino IDE to upload a test sketch. If all goes well, remove the Atmega, rinse, repeat.
I use the following command to burn with avrdude (beep
is a batch file that beeps the PC speaker).
avrdude -c siprog -p m168 -P \\.\com1 -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdd:m -U lfuse:w:0xff:m
avrdude -c siprog -p m168 -P \\.\com1 -u -U flash:w:ATmegaBOOT_168_ng.hex:i -U lock:w:0x0f:m
beep
Obviously, with a , you could avoid all the wiring. Even a nice breakout board would be a start.
Arduino (6) Bodge (1) Freeduino (6) Howto (9) Programmer (2)
Posted by spiffed at April 1, 2008 11:36 PM